package com.thinklib.service;

import com.thinklib.bean.RoleUnit;
import com.thinklib.bean.User;
import com.thinklib.util.JsonData;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

public interface AuthService {
	public String findUserByUsername(String email, String password);
	public int addUser(User user);
	public int activationEmail(String code);
	public User findUserByCode(String code);
	public List<User> findAllUser();
	public RoleUnit findRoleByUsername(int userId);
	public User findUserByEmail(String email);
    public JsonData register(HttpServletRequest request, String email, String phone, String nickname, String password, int sex);
}
